package cn.ibobo.lease.app.service.impl;

import cn.ibobo.lease.common.base.BaseMapper;
import cn.ibobo.lease.common.base.BaseServiceImpl;
import cn.ibobo.lease.app.dao.BannerMapper;
import cn.ibobo.lease.common.dto.BannerDTO;
import cn.ibobo.lease.app.service.BannerService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import java.util.List;


/**
 * 轮播图业务处理接口
 * @Author lililiang
 * @Date 2019-03-04 10:41:37
 */
@Service
public class BannerServiceImpl extends BaseServiceImpl<BannerDTO, String> implements BannerService {

    private static final Log LOGGER = LogFactory.getLog(BannerServiceImpl.class);

    @Autowired
    private BannerMapper mapper;

    @Override
    protected BaseMapper<BannerDTO, String> getMapper() {
        return mapper;
    }

    /**
     * 轮播图
列表
     * @Author lililiang
     * @Date 2019-03-04 10:41:37
     * @Param
     * @Return
     */
    @Override
    public List<BannerDTO> list4Page(BannerDTO entity, Integer pageNum, Integer... pageSize) {
        return super.list4Page(entity, pageNum, pageSize);
    }

    /**
     * 轮播图列表（无分页）
     * @Author lililiang
     * @Date 2019-03-04 10:41:37
     * @Param
     * @Return
     */
    @Override
    public List<BannerDTO> listByCondition(BannerDTO entity) {
        return super.listByCondition(entity);
    }

    /**
     * 查询轮播图详情信息
     * @Author lililiang
     * @Date 2019-03-04 10:41:37
     * @Param
     * @Return
     */
    @Override
    public BannerDTO queryOneByPk(String id) {
        return super.queryOneByPk(id);
    }

    /**
     * 保存轮播图信息
     * @Author lililiang
     * @Date 2019-03-04 10:41:37
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Integer save(BannerDTO entity) {
        return super.save(entity);
    }

    /**
     * 删除轮播图信息
     * @Author lililiang
     * @Date 2019-03-04 10:41:37
     * @Param
     * @Return
     */
    @Override
    @Transactional
    public Integer delete(String id) {
        return super.delete(id);
    }
}
